package homework_02.home_03;
import java.util.*;
public class HomeWork_03 {
    public static void main(String[] args) {
        double s,h;
        System.out.println("请输入温度：");
        Scanner input = new Scanner(System.in);
        h=input.nextDouble();
        System.out.println("摄氏度转华氏度请按1，华氏度转摄氏度请按2：");
        int a = input.nextInt();
        if(a==1){
            s=h*9/5+32;
        }else {
            s=(h-32)*5/9;
        }
        System.out.println(s);
    }
}
